#include<iostream>
#include<unistd.h>
#include<string.h>
#include <signal.h>
void die(int signal)
{
  std::cout<<"signal_id : "<<signal<<std::endl;
}
int main()
{
  int cnt=5;
  signal(SIGALRM,die);
  while(true)
  {
    cnt--;
    std::cout << "hahaha alive" << std::endl;
    if(cnt<0)
      abort();
    

  }


  return 0;
}
